package com.taoz.rpc.core.registry;

import com.taoz.rpc.core.config.ApplicationConfig;
import com.taoz.rpc.core.model.ServiceMetaInfo;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface Registry {
    // 初始化连接
    void init();

    // 进行服务注册
    void register(ServiceMetaInfo info) throws Exception;

    // 取消服务注册
    void deregister(ServiceMetaInfo info) throws Exception;

    // 进行服务发现
    List<ServiceMetaInfo> serviceDiscovery(ServiceMetaInfo info) throws Exception;

    void heatBeat();

    void watch(String servicePrefix, String serviceName);

    // 注销连接
    void destroy();
}
